package runesim.node.packethandler;
import runesim.node.model.Player;
import runesim.node.net.Packet;
import runesim.node.util.Logger;
import org.apache.mina.common.IoSession;

public class ItemOnItem implements PacketHandler {

    
    public void handlePacket(Packet p, IoSession session) {
        Player P = (Player)session.getAttachment();
        int usedWithSlot = p.readUnsignedWord();
        int itemUsedSlot = p.readUnsignedWordA();
        int useWith = P.getInventory().getIDForSlot(usedWithSlot);
        int itemUsed = P.getInventory().getIDForSlot(itemUsedSlot); 
        
        Logger.log("uws: "+usedWithSlot+", ius: "+itemUsedSlot+", uw: "+useWith+", iu: "+itemUsed);
        
		if(itemUsed == 227 && useWith == 249 || itemUsed == 249 && useWith == 227) {
			Logger.log("this works..");
		}
    }
}